﻿using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel;
using PmSoft.Core.Domain.Entities.Caching;
using PmSoft.Core.Domain.Entities;
using PmSoft.Data.Abstractions.Attributes;

namespace Demo.Domains.Entities.Sys;

[Table("sys_config")]
[CacheSetting(true)]
[Description("系统设置")]
[Auditable("sys")]
public class SysConfig : IEntity<string>
{
	/// <summary>
	/// 配置键
	/// </summary>
	[PrimaryKey("config_key", IsIdentity = false)]
	public string Id { get; set; }
	/// <summary>
	/// 配置值
	///</summary>
	[Column("config_value")]
	public string ConfigValue { get; set; }

	#region IEntity
	[NotMapped]
	object IEntity.Id => Id;
	#endregion
}
